package org.jeecg.modules.wlhy.order.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.wlhy.order.entity.HyOrder;
import org.jeecg.modules.wlhy.order.entity.HyOrderApiDTO;
import org.jeecg.modules.wlhy.order.entity.OrderMonthTotalDTO;
import org.jeecg.modules.wlhy.order.vo.HyOrderVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Description: hy_order
 * @Author: jeecg-boot
 * @Date:   2020-12-03
 * @Version: V1.0
 */
public interface HyOrderMapper extends BaseMapper<HyOrder> {

    int getCountByDate(@Param("dateString") String dateString);

    List <OrderMonthTotalDTO> getOrderMonthTotal(
                        @Param("customerId") String customerId ,
                        @Param("startMonth") String startMonth ,
                        @Param("endMonth") String endMonth);

    IPage<HyOrderVO> getPageList(Page<HyOrderVO> page, @Param(Constants.WRAPPER) QueryWrapper<HyOrderVO> queryWrapper);

    List<HyOrderVO> getPageListByDis(Page<HyOrderVO> page,@Param("p") Map p);

    BigDecimal getShippingFinishWeightById(@Param("id") String id);

    int selectOrderZhangQi(@Param("accountingPeriod") String accountingPeriod,@Param("customerId") String customerId);

    HyOrderApiDTO getInfoById(@Param("id") String id);
    IPage<HyOrderVO> getPageListByCaptaionId(Page<HyOrderVO> page, @Param(Constants.WRAPPER)QueryWrapper<HyOrderVO> queryWrapper);
}
